import json

from app.api.generate.utils.generate_queue.message_result_proccess import save_generate_image_result, set_server_online, save_generate_text_result


def msg_process(topic, data):

    if topic == "image_result":
        save_generate_image_result(data)
    elif topic == "text_result":
        save_generate_text_result(data)
